#pragma once
#include<memory>
#include<functional>
#include<string.h>

class Buffer;
class TcpConnection;
class Timestamp;
//相当于TcpConnectionPtr是指向TcpConnection对象的一个只能指针
using TcpConnectionPtr=std::shared_ptr<TcpConnection>;

using ConnectionCallback=std::function<void(const TcpConnectionPtr&)>;
using CloseCallback =std::function<void(const TcpConnectionPtr&)>;
using WriteCompleteCallback=std::function<void(TcpConnectionPtr&)>;

using MessageCallback=std::function<void(const TcpConnectionPtr&,
                                         Buffer*,
                                         Timestamp)>;
using HighWaterMarkCallback=std::function<void(const TcpConnectionPtr&,size_t)>;